package com.vcredit.creditcat.web.app;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vcredit.creditcat.api.ICustAgentManager;
import com.vcredit.creditcat.model.CustAgentVo;
import com.vcredit.creditcat.vo.JsonResult;
import com.vcredit.framework.annotation.Log;

@RestController
@RequestMapping("/agent")
public class CustAgentController extends BaseCreditCatController {

	@Reference(version = "1.0")
	private ICustAgentManager ICustAgentManager;

	/**
	 * 代理人----- 推荐二维码
	 * 
	 * 
	 * @param custReportParam
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@Log
	@RequestMapping("/agentResource")
	public JsonResult<CustAgentVo> reportAnalysis(HttpServletRequest request) throws Exception {
		Long custId = super.getCust(request).getCustId();
		return JsonResult.SuccessResponse(ICustAgentManager.CustAgentResource(custId));
	}

}
